package com.zhu.mapper;

import com.zhu.pojo.Area;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface AreaMapper {
    @Insert("insert into area (province,name,areacode) values (#{province},#{name},#{areacode})")
    public void areaadd(Area area);

    @Select("select * from area")
    public List<Area> arealist();

    @Select("Select * from area where name=#{name}")
    public List<Area> search(String name);

    @Update("update area set province=#{province},areacode=#{areacode} where name=#{name}")
    public void update(Area area);

    @Delete("delete from area where name=#{name}")
    public void delete(Area area);
}
